package com.mall.thirdparth.pay.service;

import com.mall.thirdparth.pay.model.dto.OrderPayReqDto;
import com.mall.thirdparth.pay.model.dto.OrderQueryReqDto;
import com.mall.thirdparth.pay.model.vo.OrderPayRespVo;
import com.mall.thirdparth.pay.model.vo.OrderQueryRespVo;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @ClassName OrderPayService
 * @Author ymx
 * @Description 订单支付服务
 * @Date 2023/12/21
 **/
public interface OrderPayService {

    /**
     * 创建预支付订单: 调用此方法后, 判断是否成功, 成功后需要往数据库插入订单数据
     * @param payOrderReqDto
     * @return
     * @throws Exception
     */
    OrderPayRespVo createPrePayOrder(OrderPayReqDto payOrderReqDto) throws Exception;

    /**
     * 支付回调
     * @param request
     */
    Map<String, String> payNotify(HttpServletRequest request);

    /**
     * 根据商户订单号查询订单
     * @param orderQueryReqDto
     * @return
     */
    OrderQueryRespVo queryOrder(OrderQueryReqDto orderQueryReqDto);

}
